package zhuoyue.com.yanjiaohui.acticity;

import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.EditText;

import zhuoyue.com.yanjiaohui.R;
import zhuoyue.com.yanjiaohui.util.MD5util;

public class LoginActivity extends AppCompatActivity {

    private EditText Login_num,Login_password;
    private String mWeite_num;
    private String mWeite_password;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        initView();

        initWrite();


    }

    private void initWrite() {

        mWeite_num = Login_num.getText().toString();
        mWeite_password = Login_password.getText().toString();

    }
    private void initView() {

        Login_num = (EditText) findViewById(R.id.login_num);
        Login_password = (EditText) findViewById(R.id.login_password);

    }

    //点击登录,注册
    public void btn_click(View view) {

        switch (view.getId()) {
            case  R.id.login:
           startActivity(new Intent(LoginActivity.this,TestActivity.class));
                break;
            case R.id.regist:
           startActivity(new Intent(LoginActivity.this,RegistActivity.class));
                break;
        }
      //  startActivity(new Intent(LoginActivity.this,MainActivity.class));
    }


    public void errorclick(View view) {

        startActivity(new Intent(LoginActivity.this,MainActivity.class));

    }
}
